A Net Processor (NP) is an application specific instruction processor in the field of network application, and also a software programmable component for data packet processing having architecture characteristics and/or specific circuits. In the current data communication industry, the net processor is almost used as a core component for traffic forwarding and service processing in mainstream switches and routers. The stable running of the network processor is the foundation for guaranteeing the efficient traffic forwarding of data communication products and also the basic condition of secure and stable service processing.
In the recent years, the demand for the service processing capability of the network processor grows continuously, the service implementation solution is increasingly complex, and the requirement on the forwarding performance of the network processor is higher and higher along with increasingly rich network services and more and more complex network applications, resulting in a higher abnormality possibility of the network processor at run time inevitably. In various failures, the crash abnormality of the network processor caused by software and hardware accounts for a large proportion, mainly including local endless loop of software program caused by abnormal crash of processor hardware and hardware problem, such as program endless loop caused by abnormality in accessing peripherals. Such failures are very harmful to the services running in the networks, and large packet loss, long-term disconnection, even network paralysis will occur if such failures are not handled in time, so as to cause large economic loss to operators and network users inevitably.
At present, device manufacturers in this industry mostly rely on manual investigation to solve such problems in the running process of the network processor, consuming a lot of manpower, materials and capitals, increasing the operation and maintenance cost and adding extra burden to the enterprises. To reduce the equipment operation and maintenance expense for the enterprises, it is urgent to provide a technical scheme for detecting the software and hardware crash abnormality of the network processor in order that the failure can be detected automatically at the first time by the processor software.
CN patent application (application number: 200410015057.5, publication number: CN1641600) discloses a method for forecasting a crash probability of an electronic device, in which whether the status of a system is stable or not is judged mainly by comparing a pointer value counting the times of executing debugging by the system with a pre-created system status forecasting table for forecasting the execution status of the system. This detection method is mainly focused on the forecasting for “crash”, and a forecasting table needs to be created in advance. However, the service processing of the network processor is often complicated, and the status of the system is totally different and difficult to remain the same during the processing of different services, so this method is difficult to apply to detecting the crash abnormality of the network processor.
CN patent application (application number: 200910169532.7, publication number: CN101645035) discloses a method for detecting a running position of a program code and an embedded system, in which, a program code of a predetermined output instruction is inserted by running, the output instruction contains the position information of the predetermined output instruction in the program code; and when the predetermined output instruction runs, the position information is output to an external interface which controls the position of the predetermined output instruction in the program code to be displayed on a light-emitting diode thereof according to the position information. This solution is focused on the detection for the running position of a sequence code, and an external light-emitting diode is required for display. In the hardware networking of current forwarding devices using the network processor as the core, the network processor is not connected with such peripheral as the light-emitting diode, and the display of the external light-emitting diode is impossible due to extremely high running frequency of the network processor and very fast update of the program position.